package model

type My_user_score_log struct {
	Id         uint64  `:"id"`
	UserId     uint64  `:"user_id"`    // 会员ID
	Score      float64 `:"score"`      // 变更积分
	Before     float64 `:"before"`     // 变更前积分
	After      float64 `:"after"`      // 变更后积分
	Memo       string  `:"memo"`       // 备注
	Createtime string  `:"createtime"` // 创建时间
	Type       int     `:"type"`       // 类型
	Flag       int     `:"flag"`       // 1是任务获得
	Mobile     string  `:"mobile"`     // 手机号
	Aid        uint64  `:"aid"`        // 接收的id
}

func (*My_user_score_log) TableName() string {
	return "my_user_score_log"
}

type EsScoreSelect struct {
	Took     int  `json:"took"`
	TimedOut bool `json:"timed_out"`
	Shards   struct {
		Total      int `json:"total"`
		Successful int `json:"successful"`
		Skipped    int `json:"skipped"`
		Failed     int `json:"failed"`
	} `json:"_shards"`
	Hits struct {
		Total struct {
			Value    int    `json:"value"`
			Relation string `json:"relation"`
		} `json:"total"`
		MaxScore interface{} `json:"max_score"`
		Hits     []*HitsArr  `json:"hits"`
	} `json:"hits"`
}
type HitsArr struct {
	Index  string             `json:"_index"`
	Id     string             `json:"_id"`
	Score  interface{}        `json:"_score"`
	Source *My_user_score_log `json:"_source"`
	Sort   []int64            `json:"sort"`
}

type My_game_moneys struct {
	Id         uint64  `:"id"`
	uid        uint64  `:"user_id"`    // 会员ID
	Num        float64 `:"num"`        // 变更积分
	Createtime string  `:"createtime"` // 创建时间
	Type       int     `:"type"`       // 类型
	Mobile     string  `:"mobile"`     // 手机号
	Days       uint64  `:"dats"`       // 接收的id
}

func (*My_game_moneys) TableName() string {
	return "my_game_moneys"
}
